<?php

defined('InNcPHP') or exit('Access Invalid!');

/**
 * 会员表
 * Class memberModel
 */
class memberModel extends Model{

    public static $member_sex =array(0=>'未知',1=>'男',2=>'女');

	public function __construct(){
		parent::__construct('member');
	}

	// 列表
	public function getMemberListPage($condition = array(), $field = '*', $page = 0, $order = 'member_id desc'){
		return $this->field($field)->where($condition)->page($page)->order($order)->select();
	}

	// 信息
	public function getMemberInfo($condition = array(), $field = '*'){
		return $this->field($field)->where($condition)->find();
	}

	// 添加
	public function addMember($param){
		return $this->insert($param);
	}

	// 更新
	public function updateMember($condition, $param){
		return $this->where($condition)->update($param);
	}

	// 删除
	public function delMember($condition){
		return $this->where($condition)->delete();
	}


}
?>